import { Component } from 'react'
import './Tab.css'
class Tab extends Component {
    liClick(text) {
        // console.log(text);
        this.props.getArr(text)
    }
    render() {
        // console.log(this.props);
        return (
            <ul>
                {
                    this.props.arr.map((item, i) => {
                        return <li key={i} onClick={this.liClick.bind(this, item)}>{item}</li>
                    })
                }
            </ul>
            
        )
    }
}

export default Tab